var showTabbarMenu = function(element){
	
	var option = initRightMenu(element);
	
	var addButtonLabel = dojo.create("div",{
		innerHTML: "Add Button to the TabBar: ",
		style:  "font-size: 13px; color: #aaaaaa; min-height: 30px;",
	});
	
	
	var addButtonButton = dojo.create("div", {style : "width:18px; height:18px; border: 1px solid #454545; background:#272727; text-align: center; color: #e6e6e6; font-weight: bold; cursor: pointer; float: right; margin-right: 10px;",
						innerHTML : "+",
					});
	
	dojo.connect(addButtonButton, "onclick", function(){ 
		
		var buttonNameLabel = dojo.create("div",{
			innerHTML: "Button label:",
			style:  "font-size: 13px; color: #aaaaaa;",
		});
		
		var buttonNameInput = dojo.create("input",{
			type: "text",
		});
		
		var iconLabel = dojo.create("div",{
			innerHTML: "Choose icon:",
			style:  "font-size: 13px; color: #aaaaaa;",
		});
		
		var iconSelector = dojo.create("select",{
			
		});
		
		var pageSelectorLabel = dojo.create("div",{
			innerHTML: "Connect with view:",
			style:  "font-size: 13px; color: #aaaaaa;",
		});
		
		var pageSelector = dojo.create("select",{
			
		});
		
		for(var i=0; i<numberOfPages; i++){
 			var selectorOption = dojo.create("option", {value: i+1, innerHTML: i+1});
 			pageSelector.appendChild(selectorOption);
 		}
		
		var addButton = dojo.create("button", {innerHTML: "Add Tabbar Button"});
		
		dojo.connect(addButton, "onclick", function(){ 
			
			var tb = dojo.create("li", {id: element.id +""+elementsIdCounter});
			elementsIdCounter++;
			
			element.appendChild(tb);
			
			var tabbarbutton = new dojox.mobile.TabBarButton({ moveTo:"View"+pageSelector.value, transition: "flip", label: buttonNameInput.value, icon1: "img/tabbarIconBN.png", icon2: "img/tabbarIcon.png"}, tb.id );
			
			tabbarbutton.startup();
			
			dijit.byId(element.id).resize();
			
			insertIntoGUIDescriptor(GUIDescriptor, {element: "tabbarButton", id: tb.id, attributes:{moveTo: "View"+pageSelector.value, transition: "slide", label: buttonNameInput.value, icon1: "img/tabbarIconBN.png", icon2: "img/tabbarIcon.png"}, children: [], innerHTML: ""}, element.id);
			
		});		
		
		option.appendChild(buttonNameLabel);
		option.appendChild(buttonNameInput);
		option.appendChild(iconLabel);
		option.appendChild(iconSelector);
		option.appendChild(pageSelectorLabel);
		option.appendChild(pageSelector);
		option.appendChild(addButton);
				
	});
	
	option.appendChild(addButtonButton);
	option.appendChild(addButtonLabel);
	
};